import request from '@/utils/request'

// 查询家属列表
export function listDependant(query) {
  return request({
    url: '/lxy/dependant/list',
    method: 'get',
    params: query
  })
}

// 查询家属详细
export function getDependant(id) {
  return request({
    url: '/lxy/dependant/' + id,
    method: 'get'
  })
}

// 新增家属
export function addDependant(data) {
  return request({
    url: '/lxy/dependant',
    method: 'post',
    data: data
  })
}

// 修改家属
export function updateDependant(data) {
  return request({
    url: '/lxy/dependant',
    method: 'put',
    data: data
  })
}

// 删除家属
export function delDependant(id) {
  return request({
    url: '/lxy/dependant/' + id,
    method: 'delete'
  })
}



// 查询家属报名列表
export function listDependantByTimeId(timeId,query) {
  return request({
    url: '/lxy/dependant/list/'+timeId,
    method: 'get',
    params: query
  })
}

// 删除用户选择
export function delSelectDependant(dependantId,timeId) {
  return request({
    url: '/lxy/dependant/' + dependantId+"/"+timeId,
    method: 'delete'
  })
}
